home *** CD-ROM | disk | FTP | other *** search
- Path: grimsel.zurich.ibm.com!usenet
- From: wgk@zurich.ibm.com (Keith Whittingham)
- Newsgroups: comp.lang.c++
- Subject: Re: Far Calls
- Date: 11 Apr 1996 08:42:51 GMT
- Organization: IBM Research, ZRH
- Message-ID: <4kigmb$11q9@grimsel.zurich.ibm.com>
- References: <4kgvf1$891@ttacs7.ttu.edu>
- Reply-To: wgk@zurich.ibm.com
- NNTP-Posting-Host: pine.zurich.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.00
-
- In <4kgvf1$891@ttacs7.ttu.edu>, talleyj@hub.ofthe.net (Jason) writes:
- >For any CS Majors, Junior and above...
- > How do you make a far call to a SPECIFIC address in C/C++. We must
- >write a monitor for class, with the ability to modify EXACT memory
- >locations and execute the code from a given location. Also, is anyone
- >familar with the REGISTER command? It says it will load the value
- >directly into a register, IF POSSIBLE. Now, does this if possible
- >give you a indicator that it has? If not, is there a way TO ALWAYS
- >load into a register. This program is basically supposed to be MS
- >DEGUB but designed and written by us. So far, these are the only 2
- >stumbles I have come across.
-
- Far calls: do you really want to do this, can you tell that the
- linkage of the called location is correct. The 'standard' PC way (and
- I use the word standard loosly) is to load an interrupt vector with
- the address of a routine that needs calling and generate a software
- interrupt (e.g. int86)..
-
- Register: I think you're misinterpreting the keyword. Register is
- used for optimisation purposes. Using the register modifier tells
- the compiler that this variable is being used a lot and it should
- keep it in any register it chooses (if it can) to make things
- operate faster.
-
- If you want to load registers and call functions directly then
- either use int86 or use inline assembler.
-
- Keith
-
-
-
-